# -*- coding: utf-8 -*-
#

import logging
import logging.config
import unittest

import sys
sys.path.append("../../")


from sippeer.framework.service.servicefactory import ServiceFactory
from sippeer.framework.service.servicemanager import ServiceManager

logging.config.fileConfig("../config/logging.conf")
logger = logging.getLogger("testserviceFactory")

manager = ServiceManager.getInstance()
manager.addService("IM")

class TestServiceFactory(unittest.TestCase):
    
    def setUp(self):
        self._fact = ServiceFactory()
        
    def testCreateServiceByName(self):
        service_module = self._fact.createServiceByName("IM")
        if service_module == None:
        
            print "error"
        else:
            service_module.testImport()
            
if __name__ == "__main__":
    unittest.main()
    
    
    